<form class="layui-form ajax _form" action="{if condition="isset($data.level_id)"}{:url('home/Level/level_edit','id='.$data['level_id'])}{else /}{:url('home/Level/level_add')}{/if}" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label"> 等级名称 </label>
        <div class="layui-input-block">
            <input type="text" name="level_name" value="{$data.level_name|default=''}" class="layui-input" placeholder="" required lay-verify="required"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> 消费额度 </label>
        <div class="layui-input-block">
            <input type="text"  name="amount" value="{$data.amount|default=''}" class="layui-input" placeholder="" required lay-verify="required"/>
        </div>

    </div>
    <div class = "layui-form-item" style = "text-align: right;">
        <span>必填,折扣率单位为百分比，如输入90，表示该会员等级的用户可以以商品原价的90%购买</span>
    </div>
     <div class="layui-form-item">
        <label class="layui-form-label"> 折扣率</label>
        <div class="layui-input-block">
            <input type="text"  name="discount" value="{$data.discount|default=''}" class="layui-input" placeholder="必填,设置会员购买折扣率" required lay-verify="required"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> 等级描述 </label>
        <div class="layui-input-block">
            <textarea rows="3" cols="20" name="description" class="layui-textarea" placeholder="选填,设置会员等级描述">{$data.description|default=''}</textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <button class="layui-btn layui-btn-success" type="submit">
            <i class="layui-icon layui-icon-ok"></i> 保存
        </button>
        <button class="layui-btn layui-btn-primary" type="reset">
            <i class="layui-icon layui-icon-refresh"></i> 重置
        </button>
    </div>
</form>

